README.txt
John G. Bullock
john@johnbullock.org
2019 July 17


This file provides notes on the use of replication files associated with

    Bullock, John G. 2020. "Education and Attitudes toward Redistribution in
    the United States." British Journal of Political Science 50.


The analyses in the article rely on ANES and GSS data. Almost all of the data
are available for download, but access to two GSS variables is restricted: 
data on respondents' states of residence when young and when interviewed.  
These variables are required for most of the analyses in the article, but they
are not in the replication archive. They can be requested from the GSS: see 
http://gss.norc.org/documents/other/ObtainingGSSSensitiveDataFiles.pdf. Once 
you obtain the files, you may need to alter filenames or paths in
GSS_coding.R: see the "LOAD RESTRICTED DATA" section of that file, which 
begins on line 67.


To generate all data-based figures and tables in the article, run 
createAll.sh (a bash script, for Mac and Linux) or createAll.bat (for Windows).
    You may instead generate only the figures or tables that interest you. For 
the most part, there is a one-to-one association between the R files in the  
"float_code" directory and the figures and tables that appear in the article. 
For example, float_code/Figure_1.R creates only float_output/Figure_A1.pdf. 
There are a few exceptions:

    Figure_2.R creates Figure 2. To create Figure A5, change 
    "STANDARDIZE <- FALSE" to "STANDARDIZE <- TRUE" in Figure_2.R
    
    Figure_A04.R creates Figure A4. To create:
      * Figure A7,  change "OTHER_PANELS <- 'OLS'" to OTHER_PANELS <- "2SLS_OVER_34" in Figure_A04.R
      * Figure A10, change "OTHER_PANELS <- 'OLS'" to OTHER_PANELS <- "SOUTH"        in Figure_A04.R 
      * Figure A13, change "OTHER_PANELS <- 'OLS'" to OTHER_PANELS <- "IMPUTED"      in Figure_A04.R
      * Figure A17, change "OTHER_PANELS <- 'OLS'" to OTHER_PANELS <- "WHITES_ONLY"  in Figure_A04.R
      * Figure A18, change "OTHER_PANELS <- 'OLS'" to OTHER_PANELS <- "HSGRAD"       in Figure_A04.R            

    Figure_A11.R creates Figure A11. To create Figure A12, change 
    "EDUC_DIFF <- FALSE" to "EDUC_DIFF <- TRUE" in Figure_A11.R
            
    Table A16 describes other articles. It reports no data analysis and is
    therefore not reproduced by the files in this replication archive.
    
    
To generate the imputed-data figures (A11, A12, and A13), you must begin by 
running prepareDatasets.R. You may then create the figures by running the 
relevant files in the "float_code" directory.


You will need to install a variety of packages if you want to generate all 
tables and figures. In particular, you should install the "tidyverse" bundle
and the "AER", "Amelia", "car", "dataverse", "foreach", "gdata", "Hmisc",  
"ivpack", "lattice", "multiwayvcov", and "RCurl" packages. 
    You should also install the "Bullock" package. To do so, run
"installBullockPackage.R." The package will be installed into a local package
library, not into your main package library. If you run createAll.sh or 
createAll.bat, the package will automatically be installed.   


The following devtools::session_info() information, produced after running 
float_code/Figure_2.R, may also be useful. Packages with an asterisk were 
loaded directly by Figure_2.R or by the files that it sources:

> devtools::session_info()
Session info ---------------------------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.1 (2018-07-02)
 system   x86_64, mingw32             
 ui       unknown                     
 language (EN)                        
 collate  English_United States.1252  
 tz       America/Chicago             
 date     2019-07-22                  

Packages -------------------------------------------------------------------------------------------------------------------------------------------------
 package       * version  date       source        
 abind           1.4-5    2016-07-21 CRAN (R 3.5.0)
 acepack         1.4.1    2016-10-29 CRAN (R 3.5.1)
 AER           * 1.2-5    2017-01-07 CRAN (R 3.5.1)
 assertthat      0.2.0    2017-04-11 CRAN (R 3.5.1)
 backports       1.1.2    2017-12-13 CRAN (R 3.5.0)
 base          * 3.5.1    2018-08-05 local         
 base64enc       0.1-3    2015-07-28 CRAN (R 3.5.0)
 Bullock       * 1.19     2017-04-26 local         
 car           * 3.0-0    2018-04-02 CRAN (R 3.5.1)
 carData       * 3.0-1    2018-03-28 CRAN (R 3.5.0)
 cellranger      1.1.0    2016-07-27 CRAN (R 3.5.1)
 checkmate       1.8.5    2017-10-24 CRAN (R 3.5.1)
 cluster         2.0.7-1  2018-04-13 CRAN (R 3.5.1)
 colorspace      1.3-2    2016-12-14 CRAN (R 3.5.1)
 compiler        3.5.1    2018-08-05 local         
 crayon          1.3.4    2017-09-16 CRAN (R 3.5.1)
 curl            3.2      2018-03-28 CRAN (R 3.5.0)
 data.table      1.11.4   2018-05-27 CRAN (R 3.5.1)
 datasets      * 3.5.1    2018-08-05 local         
 devtools        1.13.6   2018-06-27 CRAN (R 3.5.1)
 digest          0.6.15   2018-01-28 CRAN (R 3.5.1)
 dplyr         * 0.8.0.1  2019-02-15 CRAN (R 3.5.3)
 forcats         0.3.0    2018-02-19 CRAN (R 3.5.1)
 foreign         0.8-71   2018-07-20 CRAN (R 3.5.1)
 Formula       * 1.2-3    2018-05-03 CRAN (R 3.5.0)
 gdata           2.18.0   2017-06-06 CRAN (R 3.5.1)
 ggplot2       * 3.0.0    2018-07-03 CRAN (R 3.5.1)
 glue            1.3.0    2018-07-17 CRAN (R 3.5.1)
 graphics      * 3.5.1    2018-08-05 local         
 grDevices     * 3.5.1    2018-08-05 local         
 grid          * 3.5.1    2018-08-05 local         
 gridExtra       2.3      2017-09-09 CRAN (R 3.5.1)
 gtable          0.2.0    2016-02-26 CRAN (R 3.5.1)
 gtools          3.8.1    2018-06-26 CRAN (R 3.5.0)
 haven           2.1.0    2019-02-19 CRAN (R 3.5.3)
 Hmisc         * 4.1-1    2018-01-03 CRAN (R 3.5.1)
 hms             0.4.2    2018-03-10 CRAN (R 3.5.1)
 htmlTable       1.12     2018-05-26 CRAN (R 3.5.1)
 htmltools       0.3.6    2017-04-28 CRAN (R 3.5.1)
 htmlwidgets     1.2      2018-04-19 CRAN (R 3.5.1)
 ivpack        * 1.2      2014-10-25 CRAN (R 3.5.1)
 knitr           1.22     2019-03-08 CRAN (R 3.5.3)
 lattice       * 0.20-35  2017-03-25 CRAN (R 3.5.1)
 latticeExtra    0.6-28   2016-02-09 CRAN (R 3.5.1)
 lazyeval        0.2.1    2017-10-29 CRAN (R 3.5.1)
 lmtest        * 0.9-36   2018-04-04 CRAN (R 3.5.1)
 magrittr        1.5      2014-11-22 CRAN (R 3.5.1)
 Matrix          1.2-14   2018-04-13 CRAN (R 3.5.1)
 memoise         1.1.0    2017-04-21 CRAN (R 3.5.1)
 methods       * 3.5.1    2018-08-05 local         
 munsell         0.5.0    2018-06-12 CRAN (R 3.5.1)
 nnet            7.3-12   2016-02-02 CRAN (R 3.5.1)
 openxlsx        4.1.0    2018-05-26 CRAN (R 3.5.1)
 pillar          1.3.1    2018-12-15 CRAN (R 3.5.3)
 pkgconfig       2.0.2    2018-08-16 CRAN (R 3.5.3)
 plyr            1.8.4    2016-06-08 CRAN (R 3.5.1)
 purrr           0.2.5    2018-05-29 CRAN (R 3.5.1)
 R6              2.2.2    2017-06-17 CRAN (R 3.5.0)
 RColorBrewer    1.1-2    2014-12-07 CRAN (R 3.5.0)
 Rcpp            1.0.1    2019-03-17 CRAN (R 3.5.3)
 readxl          1.1.0    2018-04-20 CRAN (R 3.5.1)
 RevoUtils     * 11.0.1   2018-08-01 local         
 RevoUtilsMath * 11.0.0   2018-08-01 local         
 rio             0.5.10   2018-03-29 CRAN (R 3.5.1)
 rj            * 2.1.0-13 2018-05-03 local         
 rj.gd           2.1.0-2  2018-05-03 local         
 rlang           0.3.4    2019-04-07 CRAN (R 3.5.3)
 rpart           4.1-13   2018-02-23 CRAN (R 3.5.1)
 rstudioapi      0.7      2017-09-07 CRAN (R 3.5.1)
 sandwich      * 2.4-0    2017-07-26 CRAN (R 3.5.1)
 scales          0.5.0    2017-08-24 CRAN (R 3.5.1)
 splines         3.5.1    2018-08-05 local         
 stats         * 3.5.1    2018-08-05 local         
 stringi         1.1.7    2018-03-12 CRAN (R 3.5.0)
 stringr       * 1.3.1    2018-05-10 CRAN (R 3.5.1)
 survival      * 2.42-6   2018-07-13 CRAN (R 3.5.1)
 tibble          2.1.1    2019-03-16 CRAN (R 3.5.3)
 tidyselect      0.2.5    2018-10-11 CRAN (R 3.5.3)
 tools           3.5.1    2018-08-05 local         
 utils         * 3.5.1    2018-08-05 local         
 withr           2.1.2    2018-03-15 CRAN (R 3.5.1)
 xfun            0.6      2019-04-02 CRAN (R 3.5.3)
 zip             1.0.0    2017-04-25 CRAN (R 3.5.1)
 zoo           * 1.8-3    2018-07-16 CRAN (R 3.5.1)


